﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

using UnityEngine;

namespace WindowsFormsApplication2
{
    public class MessageParm
    {
		public Dictionary<String, object> result = new Dictionary<string, object>();
        public static MessageParm newBuilder() {
            return new MessageParm();
        }

        public static MessageParm Format(byte[] bytes) {
            MessageParm parm = new MessageParm();
			Debug.Log (Encoding.UTF8.GetString(bytes));
         	//parm.returnResult = JsonMapper.ToObject(Encoding.UTF8.GetString(bytes));
            return parm;
        }

		public MessageParm add(String key,object obj) {
			Debug.Log (key + "," + obj);
            result.Add(key, obj);
            return this;
        }

		public object get(String key) {
			return null;//returnResult[key];
        }

        public byte[] ToByteArray() {
            //String datas = JsonMapper.ToJson(result);
			return null;//Encoding.UTF8.GetBytes(datas);
        }
    }
}
